package com.example.bootredis.utils;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

public class TreadConcurrentExceptionTest {

    public static void main(String[] args) {
        List list = new ArrayList();
        for (int i = 0; i < 20; i++) {
            new Thread(() -> {
                list.add(UUID.randomUUID().toString());
                System.out.println(list);
            }, "线程" + i).start();
        }
    }

}
